How to update a large SQL table in chunks